package cn.yechne.easyexcel;

import cn.yechen.yygh.model.acl.User;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

/**
 * @author yechen
 * @create 2021-08-16 12:34
 */
public class ExcelListener extends AnalysisEventListener<UserData> {
    // 一行一行读取 excel 内容（从第二行开始）
    @Override
    public void invoke(UserData userData, AnalysisContext analysisContext) {
        System.out.println(userData);
    }

    // 读取之后执行
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }

    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        // super.invokeHeadMap(headMap, context);
        System.out.println("表头信息："+headMap);
    }
}
